A massively parallel processing (MPP) system is a common distributed database architecture. The MPP architecture distributes data to multiple database nodes such that the multiple nodes perform parallel processing, to improve a processing speed. According to a specific method, when a data table is established, a column is selected from the data table as a partition column. Data values included in rows in data tables are stored on database nodes in a distributed manner using a uniform partitioning function.
In the prior art, when a node receives a query request, if data in at least two data tables queried by means of the query request has associated columns, and is stored on at least two nodes in a distributed manner, distributed data re-storage is triggered such that the data that has the associated columns and that is in the at least two data tables is stored on a same node.
However, this distributed re-storage method consumes network data transmission resources and wastes storage space.